<?php

class Photo_Widget_Browse_Profile_Photo extends Nuo_Widget
{
	function execute()
	{
		$mainResource = Nuo::getVar('mainResource');

		$table = Nuo::getTable('photo');

		$select = $table -> select();

		$user = Nuo::getUser();

		// check belong to
		$select -> where('resource_id=?', $mainResource -> getItemId());

		$paging = Nuo_Paging::factory($select);

		return $this -> render(array(
			'paging' => $paging,
			'resource' => $mainResource,
		));
	}

}
